package com.jstyle.jclife.utils;

import android.content.Context;
import android.content.res.Resources;

import com.jstyle.jclife.R;


/**
 * Created by Administrator on 2017/3/24.
 */

public class NetWorkConast {
    public static final int SUCCESS=1;

    public static final String KEY_PHONE = "phone";
    public static final String KEY_userpwd = "userpwd";
    public static final String KEY_smsCode = "smsCode";
    public static final String KEY_reqType = "reqType";
    public final static String key_sign = "sign";
    public final static String key_timestamp = "timestamp";
    public final static String key_appkey = "appkey";
    public final static String key_secret = "secret";
    public static final String KEY_token = "token";
    public static final String KEY_uid = "uid";
    public static final String KEY_Content= "content";
    public static final String KEY_email = "email";
    public static final String KEY_userEmail = "userEmail";
    public static final String KEY_devicetype = "deviceType";
    public static final String KEY_AppName = "appName";
    public static final String KEY_AppVersion= "appVersion";
    public static final String KEY_Feedback_Name = "name";
    public static final String KEY_Feedback_Topic = "topic";
    public static final String KEY_osType = "osType";
    public static final String KEY_DEVICE_VERSION = "version";
    public static final String KEY_type = "type";
    public static final String KEY_oauthName = "oauthName";
    public static final String KEY_openID = "openID";
    public static final String KEY_nickName = "nickname";
    public static final String KEY_gender = "gender";
    public static final String KEY_stature= "stature";
    public static final String KEY_weight = "weight";
    public static final String KEY_birthday = "birthday";
    public static final String BIND = "bind";
    public static final String UNBIND = "unbind";

    public final static String ZC_CN = "zc";
    public final static String ZH_CN = "zh";
    public final static String ZC_EN = "en_zc";
    public final static String ZH_EN = "en_zh";
    public final static String jstyleLifeKey = "3d2ed85923ed7549";
    public final static String jstyleLifeSecret = "e1be772ece97ab65";
    public final static String fomoKey = "b3ba68c7d0d10f0b";
    public final static String fomoSecret = "eabe0964b0344a10";
    public static final String KEY_NickName = "nickname";
    public static final String KEY_OldPwd = "oldpwd";

    public static final String totalSportData = "totalSportData";//总运动数据
    public static final String detailSportData = "detailSportData";//详细运动数据
    public static final String sportTypeData = "sportTypeData";//运动类型
    public static final String detailSleepData = "detailSleepData";//详细睡眠数据
    public static final String hrvData = "hrvData";//hrv数据
    public static final String ecgData = "ecgData";//ecg
    public static final String staticHeartRateData = "staticHeartRateData";//静态心率
    public static final String dynamicHeartRateData = "dynamicHeartRateData";//动态心率
    public static final String gps = "gps";//动态心率
    public static final String heartRateData = "heartRateData";//
    public static String getResult(int code, Context context){
        int  msgId=R.string.unknown_error;
        Resources res=context.getResources();
        switch (code){
            case 1:
                break;
            case 2:
                break;
            case 1011:
                break;
            case 1012:
                msgId=R.string.user_does_not_exist;
                break;
            case 1013:
                msgId=R.string.account_or_psd_wrong;
                break;
            case 1015:
                msgId=R.string.phone_exists;
                break;
            case 1016:
                msgId=R.string.email_exists;
                break;
            case 1119:
                break;
            case 1221:
                msgId=R.string.email_format_wrong;
                break;
            case 1224:
                msgId=R.string.phone_format_wrong;
                break;
            case 1366:
                msgId=R.string.verification_code_timewrong;
                break;
            case 1367:
                msgId=R.string.verification_code_limit;
                break;
            case 1368:
                msgId= R.string.wrong_verification_code;
                break;
            case 1369:
                msgId=R.string.Authentication_code_expired;
                break;
            case 1370:
                break;
            case 1500:
                msgId=R.string.token_expired;
                break;
        }
        return  res.getString(msgId);
    }
}
